//  @ Project : SSU Robot Simulator
//  @ File Name : ErrorManager.h
//  @ Date : 4/3/2011
//  @ Author : Andrew Holbrook
//
//

#pragma once

#if !defined(_ERRORMANAGER_H)
#define _ERRORMANAGER_H

#include <map>
#include <vector>
#include <string>

#include "Error.h"

using std::map;
using std::vector;
using std::string;

namespace SSURoboSim
{
	namespace ErrorLog
	{
		class ErrorManager
		{
		public:
			static ErrorManager * getInstance();
			~ErrorManager();

			vector<string> getSystemIds();
			vector<Error> * getErrors(string systemId);
			bool isError(string systemId);

			void addError(string systemId, Error &e);

			void update();

		private:
			static ErrorManager *instance_;
			map<string, vector<Error>> errorMap_;
			
			ErrorManager();
		};
	}
}

#endif  //_ERRORMANAGER_H
